unit Unit_Welcome;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, jpeg, ExtCtrls, StdCtrls;

type
  Tfrm_Welcome = class(TForm)
    Timer1: TTimer;
    Image1: TImage;
    procedure Timer1Timer(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    flag1:boolean;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frm_Welcome: Tfrm_Welcome;

implementation

{$R *.dfm}

procedure Tfrm_Welcome.Timer1Timer(Sender: TObject);
begin
  if (Self.AlphaBlendValue<255) and (flag1=false) then
  begin
    Self.AlphaBlendValue:=Self.AlphaBlendValue+5;
    if Self.AlphaBlendValue >= 255 then
    begin
      flag1:=true;
      Sleep(1000);
    end;
  end
  else if (Self.AlphaBlendValue>0) and (flag1=true) then
  begin
    Self.AlphaBlendValue:=Self.AlphaBlendValue-5;
    if Self.AlphaBlendValue <= 0 then
    begin
      Timer1.Enabled:=false;
      self.Close;
    end;
  end;
end;

procedure Tfrm_Welcome.FormShow(Sender: TObject);
begin
  flag1:=false;
end;

end.
